import Vue from 'vue/types/umd'
import BasePageMdl from '@/model/customPageCfg/BasePageMdl'

export const TYPE_KEY_CLS = Symbol('class name')

export enum CustFormComponentGroup {
    Layout = '布局&显示',
    Basic = '基础组件',
    Extension = '拓展组件',
    Workflow = '流程组件',
    Business = '业务组件',
    None = '不显示组件',
    PageLayout = '布局&容器',
    PageBasic = '基础类',
    PageForm = '表单类',
    PageData = '数据类',
    PageChart = '图表类',
    Common = '通用类',
}

export interface BaseDesignInfo {
    elementClass: { new (): any }
    /**
     * 菜单组
     */
    group: CustFormComponentGroup
    name: string
    component?: string
    icon: string
    orderId: number
    // custType?: CustType
}
export type VueClass<V> = { new (...args: any[]): V & Vue } & typeof Vue
export type ElementClass<V> = { new (...args: any[]): V }

export interface BaseDesignInfo {
    elementClass: { new (): any }
    /**
     * 菜单组
     */
    group: CustFormComponentGroup
    name: string
    component?: string
    icon: string
    orderId: number
}

export interface CustPageCmpDesignInfo extends BaseDesignInfo {
    elementClass: ElementClass<BasePageMdl>
}
